# —*— coding: utf-8 -*-

import os

# pip install openpyxl
from openpyxl import load_workbook
from openpyxl.workbook.workbook import Workbook
from openpyxl.worksheet.worksheet import Worksheet
from openpyxl.cell import Cell

from openpyxl.styles import numbers

from py_excel import py_dir_path

if __name__ == '__main__':

    excel_path = os.path.join(py_dir_path, 'chart.xlsx')
    workbook: Workbook = load_workbook(excel_path)
    sheet: Worksheet = workbook.active

    for row in sheet.iter_rows(min_col=1, max_col=sheet.max_column, min_row=1, max_row=sheet.max_row):
        # row: tuple
        cell: Cell = None
        for cell in row:
            print(cell.value)
            pass
        pass

    for col in sheet.iter_cols(min_col=1, max_col=sheet.max_column, min_row=1, max_row=sheet.max_row):
        # col: tuple
        cell: Cell = None
        for cell in col:
            print(cell.value)
            pass
        pass
    pass
